<script>
	export let dynamic;
</script>

<div>
	<p data-foo='{dynamic}'>this is styled</p>
	<p data-foo='baz'>this is unstyled</p>
</div>

<style>
	[data-foo='bar'] {
		color: red;
	}
</style>